<?php
class Pageley_Gateway_Database_Condition_EqualsSqlDecorator extends Pageley_Gateway_Database_Condition_SingleSqlDecorator {
	
	public function getOperator() {
	    $operator = parent::getOperator();
	    if($this->getDecoratedCondition()->getValue() === null) {
	        $operator = "IS";
	    }
	    return $operator;
	}
	
	public function getKeyExpression() {
	    $keyExpression = parent::getKeyExpression();
	    if($this->getDecoratedCondition()->getValue() === null) {
            $keyExpression = "NULL";
        }
        return $keyExpression;
	}
}